Hi, |
Re: Setting a link attribute for multiple links
I think you are saying that the link-value can be determined by seeing which B object is the target of the link. That is, you could give instructions for setting the link value to some intern. And if so then you reasonably deduce you should be able to "tell" a DXL script to do it as well.
string NameLinkAttr = "Delivery Phase"
for oA in entire mod do
{ if (isDeleted(oA)) then continue
for lnk in oA ->"whatever" do
{ if (this is some other link) then continue
oB = target of the link
if (oB is not a "B" object) then continue
ValueActual = lnk.NameLinkAttr
if (!null ValueActual) then continue // Do not change an existing value
// OK, now lets try to set an currently null link value:
if (some characterist(oB) indicates Delivery A) then ValueDesired = "Del A"
elseif(some characterist(oB) indicates Delivery B) then ValueDesired = "Del B"
elseif(some characterist(oB) indicates Delivery C) then ValueDesired = "Del C"
else ValueDesired = "" // Cannot determine what we want
if (!null ValueDesired) then lnk.NameLinkAttr = ValueDesired
} // end for A->B links
} // end for objects in A
|
Re: Setting a link attribute for multiple links llandale - Thu Sep 06 16:20:36 EDT 2012
I think you are saying that the link-value can be determined by seeing which B object is the target of the link. That is, you could give instructions for setting the link value to some intern. And if so then you reasonably deduce you should be able to "tell" a DXL script to do it as well.
string NameLinkAttr = "Delivery Phase"
for oA in entire mod do
{ if (isDeleted(oA)) then continue
for lnk in oA ->"whatever" do
{ if (this is some other link) then continue
oB = target of the link
if (oB is not a "B" object) then continue
ValueActual = lnk.NameLinkAttr
if (!null ValueActual) then continue // Do not change an existing value
// OK, now lets try to set an currently null link value:
if (some characterist(oB) indicates Delivery A) then ValueDesired = "Del A"
elseif(some characterist(oB) indicates Delivery B) then ValueDesired = "Del B"
elseif(some characterist(oB) indicates Delivery C) then ValueDesired = "Del C"
else ValueDesired = "" // Cannot determine what we want
if (!null ValueDesired) then lnk.NameLinkAttr = ValueDesired
} // end for A->B links
} // end for objects in A
Just want to say a huge thanks for your help with my "remedial" questions :o) Used your outline code and got it to do what I wanted. Thanks again !! Ray |